/*
 * Copyright 2010 J Patrick Davenport
 * 
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * 
 * http://www.apache.org/licenses/LICENSE-2.0
 * 
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package v4view.web;

/**
 * Represents an object tag.
 * @author J Patrick Davenport
 *
 */
public class HtmlObject extends ChildbearingWithInterfaces {
	private static final String	CLASSID_KEY		= "classid";
	private static final String	CODEBASE_KEY	= "codebase";
	private static final String	HEIGHT_KEY		= "height";
	private static final String	NAME_KEY		= "name";
	private static final String	TYPE_KEY		= "type";
	private static final String	WIDTH_KEY		= "width";
	private static final String	ARCHIVE_KEY		= "archive";
	private static final String	CODE_TYPE_KEY	= "codetype";

	{
		this.setTag("object");
		this.setSupportsAttributes(true);
	}

	public String getClassid() {
		return this.getAttributeValue(CLASSID_KEY);
	}

	public String getCodebase() {
		return this.getAttributeValue(CODEBASE_KEY);
	}

	public String getHeight() {
		return this.getAttributeValue(HEIGHT_KEY);
	}

	public String getName() {
		return this.getAttributeValue(NAME_KEY);
	}

	public String getType() {
		return this.getAttributeValue(TYPE_KEY);
	}

	public String getWidth() {
		return this.getAttributeValue(WIDTH_KEY);
	}

	public HtmlObject setClassid(final String _value) {
		this.setAttribute(CLASSID_KEY, _value);
		return this;
	}

	public HtmlObject setCodebase(final String _value) {
		this.setAttribute(CODEBASE_KEY, _value);
		return this;
	}

	public HtmlObject setHeight(final String _value) {
		this.setAttribute(HEIGHT_KEY, _value);
		return this;
	}

	public HtmlObject setName(final String _value) {
		this.setAttribute(NAME_KEY, _value);
		return this;
	}

	public HtmlObject setType(final String _value) {
		this.setAttribute(TYPE_KEY, _value);
		return this;
	}

	public HtmlObject setWidth(final String _value) {
		this.setAttribute(WIDTH_KEY, _value);
		return this;
	}

	/**
	 * @param _string
	 * @return
	 */
	public HtmlObject setArchive(final String _value) {
		this.setAttribute(ARCHIVE_KEY, _value);
		return this;
	}

	/**
	 * @return
	 */
	public String getArchive() {
		return this.getAttributeValue(ARCHIVE_KEY);
	}

	/**
	 * @return
	 */
	public String getCodeType() {
		return this.getAttributeValue(CODE_TYPE_KEY);
	}

	/**
	 * @param _codeType
	 * @return
	 */
	public HtmlObject setCodeType(final String _codeType) {
		this.setAttribute(CODE_TYPE_KEY, _codeType);
		return this;
	}
}
